home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / dev / lang / HeliOS4.lha / helios_demo_disk4 / docs / userinterface / DOSandAREXX_Commands.doc < prev    next >
Encoding:
Text File  |  1995-03-09  |  4.7 KB  |  130 lines

  1. ******************
  2. DOS/AREXX commands
  3. ******************
  4.  
  5. There are several provisions within HeliOS for executing DOS or AREXX
  6. commands, either from the user interface or from your software.
  7.  
  8. DOS and AREXX commands can be executed in the following ways:
  9.  
  10. 1. Using menu options in the editor or interpreter.
  11.  
  12. 2. As a macro via a command key in the editor or interpreter.
  13.  
  14. 3. From the interpreter command line using the word DOSCMD.
  15.  
  16. 4. Inside a program using the word DOSCMD.
  17.  
  18. 5. Inside an editor by highlighting and compiling a DOSCMD statement.
  19.  
  20. *********************
  21. Command string length
  22. *********************
  23.  
  24. DOS/AREXX command strings may be up to 100 characters in length.
  25.  
  26. ***********************************
  27. Automatic sensing of AREXX commands
  28. ***********************************
  29.  
  30. HeliOS supports an automatic DOS/AREXX command execution system which will
  31. try to distinguish DOS from AREXX commands and run them appropriately.
  32.  
  33. HeliOS will treat any command as an AREXX function:
  34.  
  35. 1. If the command name has a ".rexx" suffix.
  36.  
  37. 2. If the command file is in the "REXX:" directory.
  38.  
  39. Otherwise the command will be treated as a normal DOS function.
  40.  
  41. *************************
  42. Creating DOS/AREXX macros
  43. *************************
  44.  
  45. DOS/AREXX macros can only be created and attached to command keys in the
  46. editor environment using the "Set DOS/AREXX macro" menu option.
  47.  
  48. DOS/AREXX macros can be saved as usual along with all other macros.
  49.  
  50. ************************
  51. Running DOS/AREXX macros
  52. ************************
  53.  
  54. Although DOS/AREXX  macros may only be created in the editor, they can be
  55. executed either from within an editor or from the interpreter environment.
  56.  
  57. **************************************************************************
  58. Special "HeliOS command line" feature of menu and macro DOS/AREXX commands
  59. **************************************************************************
  60.  
  61. When you execute a DOS/AREXX command from a macro or the menu option the
  62. command line may be set up by a special code word to run as a HeliOS code
  63. line instead of a DOS or AREXX command line.
  64.  
  65. In normal circumstances, unless the special code word is included at the
  66. start of the command line, the operation defaults to the DOS/AREXX command
  67. as explained above.  However, by including the special code at the start of
  68. the line all the rest of the line will be interpreted as HeliOS code.
  69.  
  70. If you are in an editor when the DOS command is evoked, and if you specify
  71. that this is a HeliOS command line, you will be taken out of the editor into
  72. the interpreter before your command line is executed.
  73.  
  74. The special code must consist of either 'H>' or 'E>', and must be placed at
  75. the very start of the command line.
  76.  
  77. There are two different codes because the execution of the HeliOS command
  78. line can be carried out in two ways, as follows:
  79.  
  80. Using the   H>  command ->  The interpreter goes through a full "session"
  81.                             procedure exactly as if you had typed the line
  82.                             of commands at the interpreter command line.
  83.  
  84. Using the   E>  command ->  The interpreter runs the code line without any
  85.                             of the auxiliary actions associated with normal
  86.                             interpreter sessions.
  87.  
  88. The E> command is useful if you want to run a command without explicitly
  89. performing an interpret cycle, such as when you evoke the command from an
  90. editor and your command line is to load a file into another editor.
  91.  
  92. For example, suppose you executed these command lines from an editor macro:
  93.  
  94. H> 3 EDIT S:Startup-sequence
  95.  
  96. or
  97.  
  98. E> 3 EDIT S:Startup-sequence
  99.  
  100. Both these would end up placing you in Editor3 with the startup-sequence
  101. file loaded ready to edit.
  102.  
  103. Using the H> version you would leave the editor you were in and go out into
  104. the interpreter, then you would see the interpreter go through its full
  105. session cycle, then you would then return to the editor environment with
  106. your new file in Editor3.
  107.  
  108. Using the E> version you would move directly to the new editor without
  109. going through the interpreter session: although the E> procedure does go
  110. via the interpreter, no explicit interpreter session cycle is carried out.
  111.  
  112. The latter action is preferable because it is quicker and less visually
  113. distracting.
  114.  
  115. Using this general mechanism using H> and E> it is easy to set up hot-keys
  116. to carry out commonly required HeliOS functions.
  117.  
  118. For example, you might want to set up a special command key to perform the
  119. "FORGET **CORE**" function, so you could simply create a DOS macro with the
  120. following command line:
  121.  
  122. E> FORGET **CORE**
  123.  
  124. Remember that you can only create a DOS macro within an editor, but you can
  125. USE the macro either in the editor or interpreter.
  126.  
  127. *************************************************************************
  128. End
  129. *************************************************************************
  130.